<template>
<div>
  <div class="page-title" style="width:100%">按问题管理模块分析</div>
  <div class="page-content">
    <el-row>
          <el-form :model="filterQuery">
            <el-col :span="6">
              <el-form-item>
                <treeselect
                v-model="filterQuery.companyCode"
                :multiline="false"
                :options="company"
                placeholder="搜索受检单位"
                filterable
                clearable
                style="width:80%">
                </treeselect>
              </el-form-item>
            </el-col>
            <el-col :span="2">
              <el-form-item>
                <el-date-picker
                type="date"
                v-model="filterQuery.startDate"
                placeholder="开始日期"
                format="yyyy-MM-dd"
                value-format="yyyy-MM-dd"
                style="width: 140px">
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="2">
              <el-form-item
              label="至"
              label-width="100%">
              </el-form-item>
            </el-col>
            <el-col :span="4">
              <el-date-picker
              type="date"
              v-model="filterQuery.endDate"
              placeholder="结束日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width: 140px">
              </el-date-picker>
            </el-col>
            <el-col :span="4">
              <el-form-item>
                <el-select
                v-model="filterQuery.round"
                placeholder="搜索轮次"
                filterable
                clearable
                style="width: 120px">
                <el-option
                v-for="item in round"
                :key="item"
                :label="item"
                :value="item">
                </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="2">
              <el-button type="primary" style="width: 80px" >查询</el-button>
            </el-col>
            <el-col :span="2">
              <el-button type="primary" style="width: 120px" >导出Excel</el-button>
            </el-col>
          </el-form>
        </el-row>
        <el-row>
          <el-table
          :data="array"
          border
          class="table">
          <el-table-column
          type="index"
          label="序号"
          width="50%">
          </el-table-column>
          <el-table-column
          label="问题管理模块"
          prop="name">
          </el-table-column>
          <el-table-column
          label="问题数量（项）"
          prop="num">
          </el-table-column>
          <el-table-column
          label="百分比（%）"
          prop="per">
          </el-table-column>
          </el-table>
        </el-row>
        <el-row style="height: 20px">
        </el-row>
        <!--el-row>
          <el-col :span="10">
            <div id="pieChart" style="width: 100%; height: 400px"></div>
          </el-col>
          <el-col :span="10">
            <div id="histogram" style="width: 100%; height: 300px;"></div>
          </el-col>
        </el-row-->
  </div>
</div>
</template>

<script>
import { GetCheckRound,
         GetSeverityProblem} from '../../../services/problemSeverityAnalysis'
import {GetCompany} from '../../../services/gettreedata'

export default {
  data() {
      return {
          filterQuery: {
              companyCode: '01',
              startDate: '',
              endDate: '',
              round: '',
              fieldName: 'HseFactor',
              fieldCode: '0049'
          }
      }
  }
}
</script>

<style>
.table {
  width: 60%;
  margin: auto;
  text-align: center;
}
</style>